import { request } from "@/utils/service"
import type * as Statistics from "./types/statistics"

/** 获取订单统计数据 */
export function getOrderStatisticsApi(params: Statistics.StatisticsRequestData) {
  return request<Statistics.OrderStatisticsResponseData>({
    url: "/statistics/order",
    method: "get",
    params
  })
}

/** 获取商户营收分析数据 */
export function getMerchantRevenueApi(params: Statistics.StatisticsRequestData) {
  return request<Statistics.MerchantRevenueResponseData>({
    url: "/statistics/merchant-revenue",
    method: "get",
    params
  })
}

/** 获取平台营收分析数据 */
export function getPlatformRevenueApi(params: Statistics.StatisticsRequestData) {
  return request<Statistics.PlatformRevenueResponseData>({
    url: "/statistics/platform-revenue",
    method: "get",
    params
  })
}